//
// Created by gogoqiu on 2022/3/23.
//
#include "wx/wx.h"
#include <wx/stdpaths.h>
#include <wx/config.h>

wxString GetWorkDirectory( )
{
    wxString strAppPath ;
    wxStandardPathsBase& wxStandardPaths = wxStandardPaths::Get();
    wxFileName exeFile(wxStandardPaths.GetExecutablePath());
    strAppPath = exeFile.GetPath(wxPATH_GET_VOLUME | wxPATH_GET_SEPARATOR);

    return strAppPath ;
}

wxString unescape( const wxString& src ){
    wxString tmp = src;
    //把26个字母打一遍，然后通过php的addslashes查看哪些字符变化了
    tmp.Replace("\\", "\\\\");
    tmp.Replace("\"", "\\\"");
    tmp.Replace("\'", "\\\'");
    return tmp;
}